package org.seaurchin.web;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.seaurchin.category.CategoryTree;

public class TreeServletContextListener implements ServletContextListener {

//	@Override
	public void contextDestroyed(ServletContextEvent event) {
		
	}

//	@Override
	public void contextInitialized(ServletContextEvent event) {
		ServletContext ctx = event.getServletContext();
		CategoryTree tree = new CategoryTree();
		tree.buildInitialTree();
		ctx.setAttribute("tree", tree);
	}

}
